package com.atguigu.gulimall.order.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.to.LockStockTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("gulimall-ware")
public interface WareFeignService {

    @PostMapping("/ware/waresku/stock")
    R getHasStock(@RequestBody List<Long> skusIds);

    @GetMapping("/ware/wareinfo/fare")
    public R fare(@RequestParam("addrId") Long id);

    @PostMapping("/ware/waresku/lock")
    public R lock(@RequestBody LockStockTo lockStockTo);
}
